package cn.edu.gsau.info.models;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author jinjiang
 * @since 2022-11-17
 */
@Data
@JsonSerialize
@EqualsAndHashCode(callSuper = false)
@TableName("tbl_user")
public class User implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    private String userName;

    private String nickName;

    private String password;

    /**
     * 0正常，1停用
     */
    private Integer status;

    private String email;

    private String phonenumber;

    /**
     * 男、女、未知
     */
    private String gender;

    /**
     * 存储头像路径
     */
    private String avatar;

    /**
     * 0管理员，1老师，2学生，3领导
     */
    private Integer userType;

    private String createBy;

    private Date createTime;

    private String updateBy;

    private Date updateTime;

    @TableField(exist = false)
    private String captcha;

    /**
     * 学生毕业后不允许使用本系统
     */
    private LocalDate offyear;

    /**
     * 0未删除，1已经删除
     */
    @TableLogic
    private Integer deleted;

    private String memo;

}

